/*
 *  ExposedVariable.cpp
 *  Fridge
 *
 *  Created by Jeremy Abel on 6/30/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

// Main header
#include "../Main.h"

// My header
#include "ExposedVariable.h"


ExposedVariable::ExposedVariable() 
{
	m_dValue = 0.0f;
	m_szName = 0;
	m_xVariableType = EXPOSED_VARIABLE_NUMBER;
	m_fSliderMin = 0.0f;
	m_fSliderMax = 1.0f;
	m_bShowLabel = true;
	m_bShowScale = true;
	m_bShowMinMaxLabels = true;
}

ExposedVariable::ExposedVariable( const ExposedVariable* pxExposedVariable )
{
	m_dValue = pxExposedVariable->GetValue();
	m_szName = 0;
	m_xVariableType = pxExposedVariable->GetVariableType();
	m_fSliderMin = pxExposedVariable->GetSliderMin();
	m_fSliderMax = pxExposedVariable->GetSliderMax();
	m_bShowLabel = pxExposedVariable->GetShowLabel();
	m_bShowScale = pxExposedVariable->GetShowScale();
	m_bShowMinMaxLabels = pxExposedVariable->GetShowMinMaxLabels();
	
	SetName( pxExposedVariable->GetName() );
}

void ExposedVariable::SetName( const char* szName )
{
	const u_int uMax = 128;
	
	m_szName = new char[ uMax ];
	
	strncpy( m_szName, szName, uMax );
}

// eof
